package com.story.modular.app.dao;

import com.baomidou.mybatisplus.plugins.Page;
import com.story.common.persistence.model.PayDetail;
import com.story.common.persistence.model.PayDetailDto;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface PayDetailMapper {
    int deleteByPrimaryKey(Integer payDetailId);

    int insert(PayDetail record);

    int insertSelective(PayDetail record);

    PayDetail selectByPrimaryKey(Integer payDetailId);

    int updateByPrimaryKeySelective(PayDetail record);

    int updateByPrimaryKey(PayDetail record);

    List<PayDetail> findByUserId(Integer userId);

    List<Map<String, Object>> findAll(@Param("page") Page<PayDetail> page,
                                      @Param("startTimeForm") Date startTimeForm,
                                      @Param("endTimeForm") Date endTimeForm);

    List<PayDetail> findByUser(@Param("userId") Integer userId);

    List<PayDetailDto> export(@Param("startTimeForm") Date startTimeForm,
                              @Param("endTimeForm") Date endTimeForm);
}